// 定义抽象的动物类
abstract class Animal {
    protected String name;
    protected String species;
    protected String breed;
    protected double price;

    public Animal(String name, String species, String breed, double price) {
        this.name = name;
        this.species = species;
        this.breed = breed;
        this.price = price;
    }

    public abstract void eat();

    public abstract void sleep();

    public abstract void play();

    public abstract void makeSound();
}

// 定义小猫类
class Cat extends Animal {
    public Cat(String name, String species, String breed, double price) {
        super(name, species, breed, price);
    }

    @Override
    public void eat() {
        System.out.println(name + "正在吃猫粮。");
    }

    @Override
    public void sleep() {
        System.out.println(name + "正在睡觉。");
    }

    @Override
    public void play() {
        System.out.println(name + "正在玩耍。");
        makeSound();
    }

    @Override
    public void makeSound() {
        System.out.println(name + "发出“喵喵”声。");
    }
}

// 定义小狗类
class Dog extends Animal {
    public Dog(String name, String species, String breed, double price) {
        super(name, species, breed, price);
    }

    @Override
    public void eat() {
        System.out.println(name + "正在吃狗粮。");
    }

    @Override
    public void sleep() {
        System.out.println(name + "正在睡觉。");
    }

    @Override
    public void play() {
        System.out.println(name + "正在玩耍。");
    }

    @Override
    public void makeSound() {
        System.out.println(name + "发出“汪汪”声。");
    }
}

// 主类，用于实例化对象和测试
public class Main {
    public static void main(String[] args) {
        // 实例化小猫对象
        Cat cat1 = new Cat("Tom", "猫", "英国短毛猫", 2000);
        Cat cat2 = new Cat("Kitty", "猫", "美国短毛猫", 1500);

        // 实例化小狗对象
        Dog dog1 = new Dog("旺财", "狗", "哈士奇", 2500);
        Dog dog2 = new Dog("小黑", "狗", "拉布拉多", 3000);

        // 测试方法
        cat1.eat();
        cat1.sleep();
        cat1.play();

        dog1.eat();
        dog1.sleep();
        dog1.play();
        dog1.makeSound();
    }
}
